import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

import 'routes/routes.dart';
import 'pages/tabs.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
            primarySwatch: Colors.pink,
            pageTransitionsTheme: PageTransitionsTheme(builders: {
              TargetPlatform.android: CupertinoPageTransitionsBuilder(),
              TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
            })),
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate
        ],
        supportedLocales: [
          const Locale('zh', 'CH'),
          const Locale('en', 'US'),
        ],
        home: Tabs(),
//        initialRoute: '/', // 初始化的时候加载的路由
//        debugShowCheckedModeBanner: false, // 去掉开发时候右上角debug的图标
        // 命名路由=>home.dart有跳转方法
        /*routes: {
        '/form': (context) => FormPage(),
        '/search': (context) => SearchPage()
      },*/
        onGenerateRoute: onGenerateRoute);
  }
}
